<?php


namespace app\model;

use app\process\CalFeature;
use fast\Http;
use think\facade\Cache;
use think\facade\Log;
use think\Model;

class AlbumPeople extends Model {

    public function create_data($feature,$path) {
        $now=date("Y-m-d H:i:s");
        $config=config('capture.Local');
        //$data['album_id']=-1;
        $data['feature_status']=1;
        $data['create_at']=$now;
        $data['last_time']=$now;
        //$data['source_type']=1;
        $data['show_num']=1;
        //$file_path=$config['capture_path'].'/album/-1/'.date('Ym').'/'.date('d').'/';
        $data['file_path']=$path;
        $this->save($data);
        //save_base_img($this->id,base64_img($path,0),$path);
        $photo_feature['id']=$this->id;
        $photo_feature['feature']=$feature;
        $_photo_feature=new AlbumFeature();
        $_photo_feature->save($photo_feature);
        return $this->id;
    }
}